home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacWorld 1999 January - Disc 2
/
Macworld (1999-01) (Disk 2).dmg
/
Serious Demos
/
Symbolic Composer 4.2
/
Environment
/
Projects
/
Examples
/
More Examples
/
Tempos, controllers, programs
< prev
next >
Wrap
Lisp/Scheme
|
1998-10-26
|
6KB
|
232 lines
Tempo-zones
Tempo-zone controls how often you generate tempo events. If the
zones are defined in default then the tempo zones follow zones,
and a new tempo event is sent at the start of a new zone. However,
to make smoother tempo curves you have to send tempo events in
every 1/8 or even 1/16 note. You can do this by defining the tempo
zones. If you have a section length 16/1 and you want to sent
tempos every 1/8 note you can calculate the number of events
with (get-tick '1/16) divided by (get-tick '1/8) and then you
can use this value to gen-repeat or symbol-trim a proper list
of 1/8 values, and then generate tempo curve by fourier synthesis
for the same amount of events and vector-scale it to the tempo
range. This can give very natural tempos.
Example: Sections, tempo-zones, programs and controllers
(setq toner1 '(a b c d e f g h i j k l m n o p))
(setq toner2 '(ah bi cj dk el fm gn ho ip jq kr ls))
(setq melodi1 (nthcdr 12 (gen-variants 0.343 32 toner1)))
(setq melodi2 (nthcdr 12 (gen-variants 0.343 32 toner2)))
(setq tonalitet1 (activate-tonality (lydian c 4)))
(setq tonalitet2 (activate-tonality (chromatic c 3)))
(setq rytme1 '(-1/8 1/8t 1/8t 1/8t 1/16 1/16 1/8 1/16 1/16 1/8 1/8 1/8))
(setq rytme2 '(1/4 1/16 1/16 1/8 1/8 1/8 1/8 1/8))
(setq rytme3 '(1/1))
(setq lengde1 '(1/32 1/32 1/32 1/32 1/32 1/8 1/32 1/32 1/8 1/32 1/32))
(setq lengde2 '(1/4 1/32 1/32 1/16 1/64 1/64 1/64 1/64))
(setq dynamikk1 (gen-cresc 64 100 11))
(setq dynamikk2 '(100 80 80 105 50 50 50 64))
(setq sone1 (bars-to-zones '(-4) '(4/4)))
(setq sone2 (bars-to-zones '(4) '(4/4)))
(setq sone3 (bars-to-zones '(8) '(4/4)))
(def-grammar 'melodi-struktur
sonate (intro melodi slutt)
intro (sect-a)
melodi (sect-b sect-c sect-d)
slutt (sect-e)
)
(def-orchestra 'pianist
piano (right-hand left-hand)
)
(def-section sect-a
default
program (mu80-sounds grandpno)
tempo-zones sone2
tempo '(100)
right-hand
channel 1
zone sone1
tonality tonalitet1
length rytme3
duration lengde1
symbol melodi1
velocity dynamikk1
controller
(mu80-controllers
volume (list '(115))
panning (list '(64))
reverb-level (list '(0))
chorus-level (list '(100)))
left-hand
channel 2
zone sone2
tonality tonalitet2
length rytme2
duration lengde2
symbol melodi2
velocity dynamikk2
controller
(mu80-controllers
volume (list '(115))
panning (list '(64))
reverb-level (list '(0))
chorus-level (list '(100)))
)
(def-section sect-b
default
program (mu80-sounds clavi)
tempo-zones sone3
tempo '(90)
right-hand
channel 1
zone sone3
tonality tonalitet1
length rytme1
duration lengde1
symbol melodi1
velocity dynamikk1
controller
(mu80-controllers
volume (list '(100))
panning (list '(64))
reverb-level (list '(20))
chorus-level (list '(80)))
left-hand
channel 2
zone sone3
tonality tonalitet2
length rytme2
duration lengde2
symbol melodi2
velocity dynamikk2
controller
(mu80-controllers
volume (list '(100))
panning (list '(64))
reverb-level (list '(20))
chorus-level (list '(80)))
)
(def-section sect-c
default
program (mu80-sounds elgrpnok)
tempo-zones sone3
tempo '(80)
right-hand
channel 1
zone sone3
tonality tonalitet1
length rytme1
duration lengde1
symbol melodi1
velocity dynamikk1
controller
(mu80-controllers
volume (list '(80))
panning (list '(64))
reverb-level (list '(40))
chorus-level (list '(60)))
left-hand
channel 2
zone sone3
tonality tonalitet2
length rytme2
duration lengde2
symbol melodi2
velocity dynamikk2
controller
(mu80-controllers
volume (list '(80))
panning (list '(64))
reverb-level (list '(40))
chorus-level (list '(60)))
)
(def-section sect-d
default
program (mu80-sounds harpsi)
tempo-zones sone3
tempo '(70)
right-hand
channel 1
zone sone3
tonality tonalitet1
length rytme1
duration lengde1
symbol melodi1
velocity dynamikk1
controller
(mu80-controllers
volume (list '(60))
panning (list '(64))
reverb-level (list '(70))
chorus-level (list '(30)))
left-hand
channel 2
zone sone3
tonality tonalitet2
length rytme2
duration lengde2
symbol melodi2
velocity dynamikk2
controller
(mu80-controllers
volume (list '(60))
panning (list '(64))
reverb-level (list '(70))
chorus-level (list '(30)))
)
(def-section sect-e
default
program (mu80-sounds hnkytonk)
tempo-zones sone2
tempo '(60)
right-hand
channel 1
zone sone1
tonality tonalitet1
length rytme3
duration lengde1
symbol melodi1
velocity dynamikk1
controller
(mu80-controllers
volume (list '(40))
panning (list '(64))
reverb-level (list '(90))
chorus-level (list '(10)))
left-hand
channel 2
zone sone2
tonality tonalitet2
length rytme2
duration lengde2
symbol melodi2
velocity dynamikk2
controller
(mu80-controllers
volume (list '(40))
panning (list '(64))
reverb-level (list '(90))
chorus-level (list '(10)))
)
(midiport :printer)
(play-file-p "Sonata for Piano 1.5.MID"
piano '(sonate)
)